<%include pub/admin_head.html%>
    </head>
    <body>
        <!-- Page Container -->
        <div class="page-container">
            <%include pub/admin_nav.html%>
            <!-- Page Content -->
            <div class="page-content">
            	<%include pub/admin_top.html%>
                <div class="page-inner">
                	<div class="page-title">
                        <h3 class="breadcrumb-header">合作学校列表</h3>
                    </div>
                    <div id="main-wrapper">
                        <div class="col-md-12">
                        	<button type="button" class="btn btn-success" data-toggle="modal" data-target="#schoolNameModal" id="add_banner">+ 添加合作学校</button>
                            <table class="table" style="margin-top: 10px;">
                                <thead>
                                    <tr>
                                        <th>序号</th>
                                        <th>名称</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <%if(data){%>
                                        <%for(let i=0; i< data.length;i++){%>
                                        <tr>
                                            <th scope="row"><%= i+1 %></th>
                                            <td><%= data[i].names %></td>
                                            <td>
                                                <a href="javascripts:;" class="btn btn-primary editschool" data-names="<%= data[i].names %>" data-id="<%= data[i]._id %>">修改名称</a>
                                            </td>
                                        </tr>
                                    <%}}%>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="modal fade bs-example-modal-sm" id="schoolNameModal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
            <div class="modal-dialog modal-sm">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="mySmallModalLabel">新增合作学校</h4>
                    </div>
                    <div class="modal-body">
                        <div class="form-group">
                            <label>学校名称</label>
                            <input type="text" class="form-control" id="school-names"/>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-success" id="set-new-school">确认</button>
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    </div>
                </div>
            </div>
        </div>
        <div class="modal fade bs-example-modal-sm" id="schoolEditModal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
            <div class="modal-dialog modal-sm">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="mySmallModalLabel">修改学校名称</h4>
                    </div>
                    <div class="modal-body">
                        <div class="form-group">
                            <label>学校名称</label>
                            <input type="hidden" class="form-control" id="school-id"/>
                            <input type="text" class="form-control" id="school-names-edit"/>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-success" id="set-edit-school">确认</button>
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    </div>
                </div>
            </div>
        </div>
        <!-- Javascripts -->
        <%include pub/admin_foot.html%>
    </body>
</html>